#!/usr/bin/python3
# 文件名：client.py

# 导入 socket、sys 模块
import socket,time
import sys

if __name__ == '__main__':
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect(('localhost',5000))
    while True:
        msg = input(">>")
        if msg == "bye":
            sock.send(msg)
            sock.close()
            break
        else:
            sock.send(msg)
            data = sock.recv(1024)
